<template>
	<div @click.capture="closeDrown">
		<!-- <so-header :seller="headerTitle" :noBack="false" v-if="circle_master" @done="gowrap()"></so-header> -->
    <headerSearch :title="headerTitle" :share="true" @done="gotobtn"></headerSearch>
    <!-- 下拉出现功能 -->
		<div class="dropDownpanel" v-if="drownshareShow">
				<span class="dropdown_triangle"></span>
				<a @click="shareClick" v-show="shar_show" ><i class="iconfont icon-fenxiang4" ></i>分享</a>
        <a @click="addCollect" v-show="coll_show" ><i class="iconfont icon-shoucang2" ></i>收藏</a>
				<a @click="removeCollect" v-show="recoll_show" ><i class="iconfont icon-shoucang2" ></i>取消收藏</a>
				<a @click="circleSetting" v-show="set_show"><i class="iconfont icon-shezhi1"></i>设置</a>
    </div>
    <div class="suspension_content" style="margin-bottom: 1.1rem;">
      <!-- 头部浮层 -->
      <div class="main-suspension"> 
        <div class="suspension-top"></div>
        <div class="suspension-info">
          <!-- 卡片头部-上 -->
          <div class="suspension-info-top clear">
            <div class="circle_data_img">
              <img :src="cirImg" v-if="cirImg">
              <img src="../common/images/youquan.png" alt="" v-if="c_type == 3 && !cirImg">
              <span class="img_user_one" style="color: #DD948E;" v-if="c_type == 1 || c_type == 2">{{c_name.substring(0,1)}}</span>
              <!-- <span class="img_user_one" style="color: #fff;" :style="'background-color:' + bgcolor" v-if="c_type == 1 || c_type == 2">{{c_name.substring(0,1)}}</span> -->
            </div>
            <div class="suspension-info-top-center">
              <h2>{{headerTitle}}</h2>
              <p></p>
            </div>
            <div class="suspension-info-top-right">
              <div class="btn_middle_red" @click="Join" v-if="buttonS == 1"><button>{{buttonInfo}}</button></div>
              <div class="btn_middle_red" @click="GotoCircle(chat)" v-else-if="buttonS == 4"><button>{{buttonInfo}}</button></div>
              <div class="btn_middle_red" v-else><button>{{buttonInfo}}</button></div>
            </div>
          </div>
          <!-- 卡片头部-下 -->
          <div class="suspension-circle-index-bottom" style="border-top: 1px solid #f3f3f3; padding-top: 0.3rem; margin: 0;">
            <ul class="clear">
              <li>
                <span>{{ccount}}</span>
                <span>企业数量</span>
              </li>
              <li>
                <span>{{pcount}}</span>
                <span>协会商品</span>
              </li>
              <li >
                <span>{{ncount}}</span>
                <span>协会新闻</span>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div class="main-notice" style=" position: relative;">
				<span>通知 | </span>
				<marquee>{{notice}}</marquee>

			</div>

      

      <!--圈友-->
      <div  class="circle_firend"> 
        <!-- 友圈头条 -->
        <!-- <div class="suspension_line clear">
          <img src="../common/images/tou_03.jpg" alt="">
          <marquee>热烈欢迎广东电子有限公司加入电子电器协会</marquee>
        </div> -->
        <div class="main-index-member">
            <!-- <h4>圈友企业 <a href="#">更多 <i class="el-icon-arrow-right"></i></a></h4> -->
            <div class="title_text_more">
              <h3>圈友企业</h3>
              <a href="javascript:void(0)" @click="JumpCompany">更多<i class="iconfont icon-xiangyou"></i></a>
            </div>  
            <!-- 圈友企业列表 -->
            <div class="business_lists" v-for="(list, index) in CompanyList" :key="index">
                  <div class="business_left" @click="JumpcompanyIndex(list.id)">
                      <img :src="list.log_img" v-if="list.log_img != null">
                      <img src="../common/images/youquan.png" v-else/>
                  </div>
                  <div class="business_desc" @click="JumpcompanyIndex(list.id)">
                      <h5>{{list.name}}</h5>
                      <p>{{list.description}}</p>
                  </div>
                <div class="btn_small_red" @click="JumpcompanyIndex(list.id)">
                    <button>查看</button>
                </div>
            </div>

              <!-- <ul>
                <li v-for="list in CompanyList">
                  <img src="../common/images/c_03.jpg">
                  <div class="main-center-index">
                    <h5>{{list.name}}</h5>
                      <p>{{list.description}}</p>
                  </div>
                  <div class="main-right-index">
                    <el-button>沟通</el-button>
                  </div>
                </li>
                <div class="clear"></div>
              </ul> -->
        </div>
        <!-- 热销榜单 -->
        <div class="industry_circle" style="border-top: 0 !important;">
          <div class="title_text_more">
            <h3>圈子热销<em>每日热销排行</em></h3>
            <a @click="ProductList">更多<i class="iconfont icon-xiangyou"></i></a>
          </div>
          <div class="host_item item_list">
            <!-- <div style="font-size: 0.3rem; color: rgb(102, 102, 102);line-height: 0.5rem;height: 0.5rem;" v-if="hostlist == ''">
                --&nbsp;暂无数据&nbsp;--
            </div> -->
						<div class="emptyProduct" v-if="hostlist == ''">
								<img src="../common/images/empty.png" alt="">
								<p>小主人，您的热销产品还没添加呢~请赶紧添加吧!</p>
						</div>
						<ul v-else>
							<li v-for="(host, h) in hostlist" :key="h" @click="jumpProduct(host.IDProduct)">
								<a href="javascript:void(0)">
                  <small>
                    <img src="../common/images/cm_03.jpg" v-if="host.smallImg == null">
                    <img :src="host.smallImg" alt="" v-else>
									</small>
									<span>{{host.chrName}}</span>
									<span>已售<strong>{{host.NumS}}</strong>件</span>
								</a>
							</li>
						</ul>
          </div>
        </div>
        <!-- 限时抢购 -->
        <!-- <div class="industry_circle rush_to_purchase">
          <div class="purchase_title title_text_more">
            <h3><span>圈子抢购</span><em>80</em>:<em>21</em>:<em>47</em></h3>
            <a @click="ProductList">更多<i class="iconfont icon-xiangyou"></i></a>
          </div>
          <div class="purchase item_list">
              <div class="emptyProduct" v-if="purlist == ''">
                  <img src="../common/images/empty.png" alt="">
                  <p>小主人，您的产品还没添加呢~请赶紧添加吧!</p>
              </div>
              <ul class="purchase_list clear" v-else>
                <li v-for="(pur, p) in purlist" :key="p" @click="jumpProduct(pur.IDProduct)">
                  <a href="javascript:void(0)">
                    
                    <span class="purchase_img">
                      <img src="../common/images/cindex_37.jpg" v-if="pur.smallImg == null">
                      <img :src="path + pur.smallImg" v-else>
                    </span>
                    <span>{{pur.chrName}}</span>
                    <span class="pur_scare">
                      <em>抢购价</em>
                      <strong><sub>￥</sub>{{pur.Price}}</strong>
                      <small>已抢购{{pur.NumS}}件</small>
                    </span>
                  </a>
                </li>
              </ul>
          </div>
        </div> -->
        <!-- 活动列表 -->
        <!--<div class="industry_circle active_list">
           <div class="title_text_more">
            <h3>圈子活动</h3>
            <a @click="ActivityList">更多<i class="iconfont icon-xiangyou"></i></a>
          </div> -->
          <!-- <div class="active_item item_list">
            	<div style="font-size: 0.3rem; color: rgb(102, 102, 102);     line-height: 0.5rem;height: 0.5rem;" v-if="actives == ''">
              --&nbsp;暂无数据&nbsp;--
          </div> -->
					<!-- <div class="emptyProduct" v-if="actives == ''">
							<img src="../common/images/empty.png" alt="">
							<p>小主人，您的活动还没添加呢~请赶紧添加吧!</p>
					</div> -->
					<!-- <ul class="circle_actives_item_list" v-else>
						<li v-for="(activeitem, act) in actives" :key="act" @click="activitydetailClick(activeitem.id)">
							<a href="javascript:void(0)" class="clear">
                <small>
                  <img src="../common/images/cindex_19.jpg" v-if="activeitem.img == null">
                  <img :src="activeitem.img" alt="" v-else>
                </small>
								<p class="active_text"><em class="cur">热门</em>{{activeitem.title}}</p>
								<p class="active_text">开始时间：{{activeitem.begin_time}}</p>
								<p class="active_text"><span><sub>￥</sub><strong>{{activeitem.price}}</strong>起</span></p>
							</a>
						</li>
					</ul> 
          </div>-->
        </div>
        <!-- 资讯列表 -->
        <div class="industry_circle more_info" style="margin-top: 0.2rem;">
          <div class="title_text_more" style="padding: 0 0.4rem;">
            <h3>圈子新闻</h3>
            <a @click="NewsList">更多<i class="iconfont icon-xiangyou"></i></a>
          </div>
          <div class="info_list_circle">
            <!-- <div style="font-size: 0.3rem; color: rgb(102, 102, 102);     line-height: 0.5rem;height: 0.5rem;" v-if="infos == ''">
                  --&nbsp;暂无数据&nbsp;--
            </div> -->
            <div class="emptyProduct" v-if="infolist == ''">
                <img src="../common/images/empty.png" alt="">
                <p>小主人，您的新闻还没添加呢~请赶紧添加吧!</p>
            </div>
            <ul v-else v-for="(initem, t) in infos" :key="t" >
              <li @click="newsdetailClick(initem.IDNews)" v-if="initem.count ==1">
                <a href="javascript:void(0)" class="clear">
                  <div class="info_list_item_left">
                    <img src="../common/images/cindex_41.jpg"  v-if="initem.img == null">
                    <img :src="initem.img" alt="" v-else> 
                    
                    
                    <!-- <img :src="initem.img"> -->
                  </div>
                  <p>{{initem.Title}}</p>
                  <p><span>{{initem.summary}}</span><span>{{initem.dtCreate}}</span></p>
                </a>
              </li>
              <li  @click="newsdetailClick(initem.IDNews)" v-else>
                <div class="info" style="padding: 0 0.2rem !important;">
                  <p>{{initem.Title}}</p>
                  <ul>
                    <li v-for="(info, fo) in initem.img" :key="fo">
                      <a href="javascript:void(0)">
                        <img src="../common/images/cindex_41.jpg"  v-if="info == null">
                        <img :src="info" alt="" v-else>
                      
                      </a>
                    </li>
                  </ul>
                  <p class="info_time"><span>{{initem.summary}}</span><span>{{initem.dtCreate}}</span></p>
                </div> 
              </li>
            </ul>
          </div>
        </div>
      </div>
      <!--圈友结束-->
      
      
      <!-- 分享引导 -->
      <div class="Share_guidance" @click="closeShare"  v-if="shareshow"></div>
      <shareTopage v-if="shareToShow" @wxdone="closeShare" @wxmessage="MessageShareData" @wxline="TimelineShareData"></shareTopage>
      <share v-if="isShow" @success="shareSuccess" @closeShare="closeShare" :title="headerTitle + '的圈子主页'" :desc="c_brief ? c_brief:'暂无简介'" :link="shareLink" :Sharing="Sharing" :imgUrl="shareLink + circleImgUrl"></share>
      <!-- </div> -->
      <mt-popup
        v-model="popupVisible"
        position="bottom">
        <ul> 
          <li v-for="list in UcompanyList" @click="JoinCirlce(list.id)" :key="list.id">{{list.name}}</li>
        </ul>
      </mt-popup>
     <so-footer></so-footer>
	</div>
</template>

<script>
// import soHeader from '../public/header.vue';
import headerSearch from '../public/header-search.vue';

import soFooter from '../components/footer-bar';
import { MessageBox } from 'mint-ui';
import share from '../components/WebShare.vue';
import shareTopage from '../components/shareTopage';
  export default {
    data() {
      return {
        circleImgUrl: require('../common/images/UI-11.png'),
        isShow: false,
      	headerTitle:'',
      	cid:'',
      	popupVisible:false,
        CompanyList:[],
        UcompanyList:[],
        info:'',//圈子信息
        c_uid:'',
        buttonInfo:'编辑',
        userInfo:'',//用户信息
        cirImg:'',
        bgcolor: '',
        c_name: '',
        c_type: '',
        c_brief: '', //用户简介
        companyLiAvatarHeight:'',
        buttonStatus:'1',
        buttonS:'1',
        count:'',
        circle_master:false,
        circle_member:false,
        circle_tourist:false,
        ccount:'0',//圈子企业数量
        pcount:'0',//圈子产品数量
        ncount:'0',//圈子动态数量
        notice:'',//圈子动态公告
        drownshareShow: false, //遮罩层
        coll_show:true,//收藏
        recoll_show:false,//已收藏
        shareshow:false,   //微信分享引导

        //显示控制
        notice_content:'',//企业公告内容
				descShow: false, //简介编辑
				editortext: '编辑',
				editor: '编辑',
				notice_show:true,//公告显示
				set_show:false,//设置显示
				join_show:false,//申请加入按钮显示
        shar_show:true,//分享按钮显示
        shareToShow: false,    //分享引导
        Sharing: '',   //分享参数

				s_btn_more:false,
				com_show:true,//公司简介显示控制
				fa_show:true,//法人代表模块显示控制
				base_show:true,//基本信息显示控制
				hot_show:true,//热销模块显示控制
				qi_show:true,//抢购模块显示控制
				new_show:true,//新闻咨询模块显示控制
				hou_show:true,//活动模块显示控制
				//编辑显示控制
				com_set_show:false,//公司简介模块显示控制
				fa_set_show:false,//法人代表模块显示控制
				base_set_show:false,//基本信息显示控制
				hot_set_show:false,//热销模块显示控制
				qi_set_show:false,//抢购模块显示控制
				new_set_show:false,//新闻咨询模块显示控制
				hou_set_show:false,//活动模块显示控制
				notice_editor:false,//公告遮罩层显示控制
				add_module:false,//添加模块显示控制
        ed_show:false,
        edit_show:false,//下拉编辑显示

        shareShow:false,//分享显示控制
        shareLink:'',//分享链接

        access_token:'',
       
        hostlist: [],
        purlist: [],
        actives: [],
        infos: [],
        infolist: [],
        uid:'',
        chat:'',
      };
    },
    components:{
      headerSearch,     
      share,
      shareTopage,
      soFooter 
    },
    created() {
        let that = this;
        that.userInfo = JSON.parse(window.localStorage.getItem('userInfo'));
        that.access_token = window.localStorage.getItem('access_token');
        that.cid = that.$route.query.paicheNo;
        if(that.userInfo){
          that.uid = that.userInfo.uid;
          //获取当前用户的所绑定的企业信息
          that.getThisUcompanyList(that.userInfo.uid);
          // //验证当前用户是否为当前圈子的圈主
          that.checkThisCircleUser(that.userInfo.uid);
          //检测当前圈子主页是否被收藏
          that.checkCollect();
        }else{
          that.uid = 0;
          that.circle_tourist = true;
          that.circle_member = false;
          that.circle_master = false;
          that.buttonStatus = 2;
          that.buttonInfo = '加入圈子';
          that.coll_show = false;
        }
				
        //获取当前圈子的企业
	      that.getUserEnterprise();
	      //获取当前圈子信息
        that.getThisCircleInfo();

			  that.shareLink = location.href.split('#')[0];
       
	      //给企业图标给宽度
        // let _width = that.$refs.img_li.offsetWidth;
	      // that.companyLiAvatarHeight = (_width - 10) *0.16;

    },
    mounted() {
        let that = this;
        window.localStorage.setItem('paicheNo', this.$route.query.paicheNo);
    },
    methods: {
      //点击更多产品列表
      ProductList(){
        this.$router.push({ path: '/circleProduct',query: {cid: this.cid}});
      },
      //点击更多活动列表
      
      ActivityList(){
        this.$router.push({ path: '/circleActivity',query: {cid: this.cid}});
      },
      //点击更多新闻列表
      NewsList(){
        this.$router.push({ path: '/circlenews',query: {cid: this.cid}});
      },
      //点击商品查看详情
			jumpProduct(val){
				console.log(val);
				this.$router.push({
						path: '/productDetail',
						query: {id: val}
				})
      },
      //点击新闻详情
      newsdetailClick(val) {
        this.$router.push({ path: '/newsDetail',query: {id: val}});
      },
      //点击活动详情
      activitydetailClick(val) {
        this.$router.push({ path: '/activityDetail',query: {id: val}});
      },
      // 点击三个点提示分享引导
      shareClick() {
          if(typeof Wechat !='undefined'){   //安卓
              console.log('进来安卓了');
              this.shareToShow = true;
          }else{
            console.log('进来浏览器')
            //浏览器
              var ua = navigator.userAgent.toLowerCase();
              //微信浏览器
              var isWeixin = ua.indexOf('micromessenger') != -1;
              // this.shareshow = true;
              //微信浏览器
              this.isShow = true;
              this.shareshow = true;
          }
          this.drownshareShow = false;
      },
      // 点击分享遮罩层关闭
      closeShare() {
          this.isShow = false;
          this.shareToShow = false;
          this.shareshow = false;
      },
      //微信群 / 好友
      MessageShareData() {
          this.shareToShow = false;
          this.Sharing = 1;
          this.isShow = true;
          console.log('分享到好友');
      },
      //微信朋友圈
      TimelineShareData() {
          this.shareToShow = false;
          this.Sharing = 0;
          this.isShow = true;
          console.log('分享到微信朋友圈');
      },
      //下拉分享、收藏
      gotobtn() {
          this.drownshareShow = !this.drownshareShow;  //打开下拉分享、收藏
      },
      // 点击空白，下拉框收起
      closeDrown() {
          this.drownshareShow = false;
      },
       /**
			 * 分享数+1
			 */
			shareSuccess: function(){
					var ddd = {};
					ddd.user_id = this.userInfo.uid;
					ddd.module = 2;
          ddd.module_id = this.cp_id; 
          this.isShow = false;
          // this.shareshow = false;
					this.$post(this.$path + '/index.php/api/count/share', ddd).then((response) => {
							
					})
			},
			/**
			 * 访问量加1
			 */
			visit: function(){
					console.log(955);
					// var data  = this.options;
					var ddd = {};
					ddd.user_id = this.userInfo.uid;
					ddd.module = 2;
					ddd.module_id = this.cp_id; 

					this.$post(this.$path + '/index.php/api/count/visit', ddd).then((response) => {
							
							console.log(response)
					})
      },
      //收藏
			 addCollect: function(){
					var that = this;
					if(this.userInfo.uid == 0 || this.access_token == ''){
							this.$openTips({
									text: '请先登陆',
									time: 2000
							}) 
							this.$router.push({
									path: '/login',
							})
					}else{
							var coll = {};
							coll.module = 4;
							coll.module_id = that.cid;
							coll.user_id = that.userInfo.uid;

							this.$post(this.$path + '/index.php/api/collection/addCollection', coll).then((response) => {
									if(response.code == 200){
										that.recoll_show = true;
										that.coll_show = false;
										that.dropintopShow = false;
											that.$openTips({
													text: response.msg,
													time: 2000
											})
											that.isCollect = true;
									}
							})
					}
			},
			//已收藏
			removeCollect: function(){
				var that = this;
				if(this.userInfo.uid == 0 || this.access_token == ''){
						this.$openTips({
								text: '请先登陆',
								time: 2000
						}) 
						this.$router.push({
								path: '/login',
						})
				}else{
							var coll = {};
							coll.module = 4;
							coll.module_id = that.cid;
							coll.user_id = that.userInfo.uid;
						this.$post(this.$path + '/index.php/api/collection/removeCollection', coll).then((response) => {
								if(response.code == 200){
									that.recoll_show = false;
										that.coll_show = true;
										that.dropintopShow = false;
										that.$openTips({
												text: response.msg,
												time: 2000
										})
										that.isCollect = false;
								}
						})
				}
			},
			//检测当前企业是否已收藏
				checkCollect: function(){
						var that = this;
						console.log(that.access_token);
						if(!that.userInfo.uid == 0 && !that.access_token == ''){
							console.log('check')
							var coll = {};
							coll.module = 4;
							coll.module_id = that.cid;
							coll.user_id = that.userInfo.uid;
								this.$post(this.$path + '/index.php/api/collection/checkCollection', coll).then((response) => {
										console.log(858,response);
										if(response.code == 200){
											if(response.data == false){
												that.recoll_show = false;
												that.coll_show = true;
											}else{
												that.recoll_show = true;
												that.coll_show = false;
											}
											
												that.isCollect = response.data;
										}
								})
						}
				},

      //点击设置进入圈子管理
			circleSetting(){
				this.$router.push({ path: '/userCenter/CircleData',query: {paicheNo: this.cid}});
			},
      //下拉
      // dropDown() {
      //   this.dropintopShow = !this.dropintopShow;
      // },
			// 点击空白收起下拉
			// closeDrown() {
			// 	this.dropintopShow = false;
			// },
      // 点击三个点提示分享引导
			// gotobtn() {
			// 	this.shareShow = !this.shareShow;
      //   this.dropintopShow = false;
      //   this.ISshow = true;
      // },
      //点击设置进入企业管理
			teamCompanyData(){
				this.$router.push({ path: '/userCenter/companyData',query: {cpId: this.cp_id,u_type:this.u_type}});
			},
      //获取圈子信息
      getThisCircleInfo:function(){
        let that = this;
        that.cid = that.$route.query.paicheNo;
        let uid = that.uid;
        console.log('当前用户id',uid);
        this.$fetch(this.$path+'/api.php/Circle/getCircleInfo',{cid:that.cid,uid:uid})
          .then((res) => {
          	console.log('圈子信息',res);
            if(res.code == 200){
              that.cirImg = res.data.img;
              that.info = res.data;
              that.headerTitle = res.data.c_name;
              that.c_uid = res.data.c_uid;
              that.pcount = res.data.pcount;
              that.ncount = res.data.ncount;
              that.notice = res.data.notice;
              that.hostlist = res.data.pro_hot;
              that.purlist = res.data.pro_panic;
              that.actives = res.data.activity;
              that.infos = res.data.news;
              that.c_type = res.data.c_type;
              that.bgcolor = res.data.bgcolor;
              that.c_name = res.data.c_name;

              that.chat = res.data.chat;
              that.c_brief = res.data.c_brief;
            }    
          });
      },
      //点击申请加入圈子
      Join:function(){
        let that = this;
       
      	if(!that.userInfo){
            that.$router.push({path: '/login'}); 
        }
        let uid = that.userInfo.uid;
      	let c_uid = that.info.c_uid;
      	let cid = that.cid;
      	if(c_uid == uid){
      		that.$router.push({path: '/JoinCircle', query: {cid: cid}}); 
      	}else{
      	let a= that.UcompanyList;
      	if(a ==''){
	      		MessageBox.alert('请您先绑定企业');
	      		 return false;
  	    }else{
          // this.popupVisible = true;
          that.$router.push({path: '/JoinCircle', query: {cid: cid}});
  	    }
	    
     	}
      },
      //加入圈子申请
      JoinCirlce:function(event){
      	let that = this;
        that.popupVisible = false;
        let cid = that.cid;
        let uid = that.userInfo.id;
        let cp_id = event;
        if(cid ==''){
            MessageBox.alert('请选择您所代表的企业').then(action => {
              that.$router.push('/userCenter');
            });
           return false;
        } 
      		that.$fetch(
	          that.$path+'/api.php?s=/Circle/circleJoin',{cid:cid,uid:uid,cp_id:cp_id})
	        .then((res) => {
	          if(res.code == 200){
              MessageBox.alert('申请成功,等待审核').then(action => {
                  that.$router.push('/userCenter');
              });
	             
	          }else{
	            MessageBox.alert(res.msg);
	          }
	                
	        })
      },
      //获取圈子中的企业
      getUserEnterprise:function(){
      	let that = this;
        let cid = that.$route.query.paicheNo;

        this.$fetch(that.$path+'/api.php/Circle/getCircleCompanyList',{cid:cid})
        .then((res) => {
          console.log('圈子企业',res);
          that.ccount = res.data.count;
          that.CompanyList = res.data.list;
        })
      },
      //获取用户绑定的企业
      getThisUcompanyList:function(userId){
      	let that = this;
        this.$fetch(that.$path+'/api.php/company/getUserAllCompanyList',{userId:userId})
        .then((res) => {
          if(res.data.count < 1){
          	that.UcompanyList = '';
          }else{
          	that.UcompanyList = res.data.list;
          }
        })
      },
      //验证当前用户是否为当前去圈子的圈主
      checkThisCircleUser:function(uid){
          let that = this;
          let cid = that.cid;
          console.log('企业id',cid);
      		this.$fetch(that.$path+'/api.php/circle/checkUserId',{cid:cid,uid:uid})
	        .then((res) => {
              console.log('圈子身份',res);
		         if(res.code == 200){
              if(res.data == 1){//圈主
                that.circle_master = true;
                that.edit_show = true;
                that.set_show = true;
                that.buttonInfo = '进入圈子';
                that.buttonS = 4;
              }
              else if(res.data == 2){//待通过圈友
                that.buttonStatus = 2;
                that.buttonS = 2;
                that.buttonInfo = '待通过';
                that.circle_member = true;
                that.circle_master = false;
              }
              else if(res.data == 4){//已通过圈友
                that.buttonStatus = 2;
                that.buttonS = 4;
                that.buttonInfo = '进入圈子';
                that.circle_member = true;
                that.circle_master = false;
              }
              else if(res.data == 3){//绑定企业但是没有加入圈子
                that.circle_tourist = true;
                that.circle_member = false;
                that.circle_master = false;
                that.buttonInfo = '加入圈子';
                that.buttonStatus = 2;
              }
              else{
                that.circle_tourist = true;
                that.circle_member = false;
                that.circle_master = false;
                that.buttonStatus = 2;
                that.buttonInfo = '加入圈子';
              }
              
	      		}else if(res.code == '-1'){
	      			console.log('检测用户身份error');
	      		}
	        })

      		
      },
      //跳转到更多的企业列表
      JumpCompany() {
      	let that = this;
      	let cid = that.cid;
        that.$router.push({path: '/home/CircleCompanyList', query: {paicheNo: cid}}); 
      },
      //点击企业跳转到圈聊页面
      JumpcompanyInfo:function(cpId){
        window.location.href = '/userCenter/companyIndex?cp_id=' + cpId;
      	// this.$router.push({path: '/userCenter/companyIndex', query: {cp_id: cpId}}); 
      },
     
      //点击企业名字跳转企业首页
      JumpcompanyIndex(id){
        if(this.$system != 'ios'){
          this.$router.push({path: '/userCenter/companyIndex', query: {cp_id: id}}); 
        }else{
          window.location.href = '/userCenter/companyIndex?cp_id=' + id;
        }       
      }, 
      //进入圈子
      // GotoCircle() {

      // },

          //  进入圈子 切换当前聊天对象
      GotoCircle (chat) {
        this.currentChat = chat
        // console.log(chat);
        // 消息设置为已读
        if (chat.notReadNum > 0) {
          updateChat({id: chat.chat_id}).then(res => {
            if (parseInt(res.status) === 1) {
              chat.notReadNum = 0
              this.$router.push({
                path: '/chat',
                query: {
                  chat: chat
                }
              });
            }
          })
        }else{
          this.$router.push({
            path: '/chat',
            query: {
              chat: chat
            }
          });
        }
      },
      
      
    }
  }

</script>
<style >
@import '../common/css/userCenter.css';
/* 分享引导 */
/* .Share_guidance {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('../common/images/share.png') no-repeat;
    background-size: cover;
    z-index: 100;
    opacity: 0.8;
} */
/* 下拉框 */
.drop_intop_panel {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 16;
}
.dropDownpanel {
    width: auto;
    height: auto;
    background-color: #fff;
    position: absolute;
    top: 0.88rem;
    right: 0.1rem;
    z-index: 15;
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(211, 125, 125, 0.34);
}
.dropDownpanel .dropdown_triangle {
    width: 0;
    height: 0;
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
    border-bottom: 8px solid #fff;
    position: absolute;
    right: 0.13rem;
    top: -0.14rem;
    z-index: 15;
}
.dropDownpanel a {
    font-size: 0.3rem;
    color: #333;
    display: block;
    line-height: 0.92rem;
    height: 0.92rem;
    text-align: left;
    padding: 0 0.2rem;
}
.dropDownpanel a .icon-icon,
.dropDownpanel a .icon-bianji1,
.dropDownpanel a .icon-fenxiang4,
.dropDownpanel a .icon-shezhi1,
.dropDownpanel a .icon-shoucang2, {
  font-size: 0.36rem;
	margin-right: 0.2rem;
  color: #333;
  margin-right: 0.2rem;
  display: block;
}
/* 友圈头条 */
.circle_firend marquee {
    font-size: 0.28rem;
    color: #999;
    float: left;
    width: 80%;
    height: 0.6rem;
    line-height: 0.6rem;
}
.item_list {
  background-color: #fff;
}
.notice{
	margin-top: 10px;
    background: #fff;
    text-align: left;
    margin-bottom: 0;
    line-height: 35px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}
.notice img{
	float: left;
    height: 35px;
    margin: 0 10px;
}
.main-index{
    padding: 0.4rem 0 0;
    background: #fff;
}
.main-index h4{
  margin: 0 0 20px 10px;
  padding: 0;
  text-align: left;
}
.main-index h4 a{
  float: right;
  color:#ccc;
  margin-right:10px;
  font-size: 14px;
}
.main-index h4 span{
  color:#f00;
  font-size:14px;
}
.icon-xiangyou{
      margin-top: 4px;
    margin-left: 5px; 
}
.main-center-index h5{
  font-size: 16px;
  margin: 0;
  padding: 0;
}
.main-center-index p{
  font-size: 16px;
}
.main-right-index {
  float: right;
  width: 20%;
  padding-right:20px;

}
.main-center-index{
      text-align: left;
    margin-left: 2%;
    float: left;
    width:55%;
}
.mt-circle-tui{
  margin: 0.2rem 0 0 0;
  background-color: #fff;
} 
.mt-circle-tui .recommend {
  font-size: 0.22rem;
  color: #e50838;
}
.main-index-member{
  background-color: #fff;
  margin-bottom: 0.2rem;
}
.main-center-index{
      text-align: left;
    margin-left: 2%;
    float: left;
    width:55%;
}
.main-huo-list{
    text-align: left;
    margin-left: 2%;
    float: left;
    width:65%;
}
.main-huo-list h5{
  font-size: 16px;
  margin: 0;
  padding: 0;
}
.main-huo-list p{
  font-size: 16px;
}
.main-center-index h5{
  font-size: 16px;
  margin: 0;
  padding: 0;
}
.main-center-index p{
  font-size: 16px;
}
.main-right-index {
  float: left;
    width: 20%;

}
/* 通知内容区 */
.main-notice {
	height: 0.6rem;
	width: 100%;
	background-color: #fff;
	display: flex;
	justify-content: flex-start;
	line-height: 0.6rem;
	padding: 0 0.2rem;
	margin-bottom: 0.2rem;
}
.main-notice span {
	font-size: 0.34rem;
	color: #e50838;
	font-weight: bold;
	display: inline-block;
	width: 1.4rem;
	margin-left: -0.1rem;
}
.main-notice marquee {
	font-size: 0.28rem;
	color: #333;
	line-height: 0.66rem;
}
.main-notice .notice_editor {
    position: absolute;
    width: 95%;
    height: 0.6rem;
    background-color: rgb(0,0,0,0.4);
    left: 0.2rem;
}
.main-notice small {
		float: right;
    height: 0.6rem;
    margin-top: -0.2rem;
		padding-right: 0.14rem;
		color: #fff;
}
.main-notice .notice_editor .icon-shanjian {
    position: absolute;
    left: -.1rem;
		top: -0.3rem;
		color: #e50838;
}

.main-index-member .el-hot-product li img{
    float: left;
    margin: 5px;
    width:100%;
    border-radius: 4px;
}
.main-index-member .el-hot-product li{
  width:28%;
  margin-left:4%;
  float:left;
  padding:0;
  border-bottom:none;
  margin-bottom:15px;
}
 .main-index-member .el-hot-product li p{
  padding:0;
  margin:5px;
  text-align:center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  float:left;
}
.main-index-member .el-hot-product li span{
  color:#999999;
}
.main-index-member .el-hot-product li span font{
  color:#cc0000;
  margin:0 5px;
}

.main-index-member .el-hot-Snatch li img{
    float: left;
    margin: 5px;
    width:95%;
    border-radius: 4px;
}
.main-index-member .el-hot-Snatch li{
  width:48%;
  margin-left:2%;
  float:left;
  padding:0;
  border-bottom:none;
  margin-bottom:15px;
}
.main-index-member .el-hot-Snatch li p{
  padding:0;
  margin:5px;
  text-align:left;
  font-family: 微软雅黑;
  color: #333;
}
.main-index-member .el-hot-Snatch li span{
  color:#999999;
}
.main-index-member .el-hot-Snatch li span font{
  color:#f00;
  margin:0 5px;
}
.main-index-member .el-hot-Snatch li .left{
    background: #cc0000;
    color: #fff;
    padding: 2px 5px;
    font-size: 14px;
    float: left;
    border-radius: 2px;
}
.main-index-member .el-hot-Snatch li font{
  color:#cc0000;
  font-size:18px;
}
.main-index-member .el-hot-Snatch li .right{
  font-size:12px;
}

.main-index-member .el-activity li{
  position:relative;
}
.main-index-member .el-activity li img{
  border-radius: 4px;
  width:30%;
  height:100px;
  margin:0;
}
.main-index-member .el-activity .main-center{
  width:65%;
}
.main-index-member .el-activity .main-center p{
  font-size:14px;
  color:#a7a7a7;
}
.main-index-member .el-activity .el-button{
  width:100px;
  float:right;
  margin-top:5px;
  border-radius: 2px;
  color: #fff;
      padding: 6px 10px;
    margin-right: 10px;
    background:#ed5252;
}

.main-index-member .el-activity .main-huo-list .price{
  float:left;
  color:#cc0000;
  font-weight: bold;
  position: absolute;
  bottom: 10px;
}
.main-index-member .el-activity .main-huo-list .prices{
  float:left;
  color:#999999;
  font-size:14px;
      position: absolute;
    bottom: 10px;
}
.main-index-member .el-activity .main-huo-list .date{
   color:#999999;
  font-size:14px;
      position: absolute;
    bottom: 10px;
    right:20px;
}
.main-index-member .el-activity .first h5{
  font-size:12px;
  text-align:left;
}
.main-index-member .el-activity .first img{
  width:30%;
  margin-right:3%;
}
.main-index-member .el-activity .first span{
  
  color:#999999;
}
.main-index-member .el-activity .first  .left{
  float:left;
  margin:5px 0;
}
.main-index-member .el-activity .first .right{
   float:right;
   margin:5px 15px;
}

/* 游客 */
.purchase_title span {
  margin-right: 0.24rem;
}
.purchase_title em {
  font-style: normal;
  font-size: 0.2rem;
  color: #fff;
  background-color: #E50834;
  padding: 0.06rem;
  margin-left: 0;
}
/* 圈友 */
.circle_firend .industry_circle {
    margin: 0 !important;
    background: #fff;
    /* margin-top: -0.2rem !important; */
}

/***热销榜单****/

.host_item small {
  width: 2.24rem;
  height: 2.24rem;
  text-align: center;
  vertical-align: middle;
  margin-bottom: 0.1rem;
}
.host_item small img {
  width: 2.2rem;
  height: 2.2rem;
  max-width: 100%;
  max-height: 100%;
}
/* 热销产品为空 */
.host_item .emptyProduct {
  padding: 0 0 0.2rem;
  box-sizing: border-box;
}
.host_item .emptyProduct img {
  width: 1.56rem;
  height: 1.22rem;
  margin: 0 auto;
}
.host_item .emptyProduct p {
  font-size: 0.26rem;
  color: #999;
  text-align: center;
}


/* 抢购 */
.purchase_list .purchase_img {
  width: 3.45rem;
  height: 3.45rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  -o-text-overflow: ellipsis;
  overflow: hidden;
}
.purchase_list .purchase_img img {
  /* width: 100% !important; */
  height: 3.45rem;
  max-width: 100%;
  max-height: 100%;
}

/* 限时抢购产品为空 */
.purchase .emptyProduct {
  padding: 0 0 0.2rem;
  box-sizing: border-box;
}
.purchase .emptyProduct img {
  width: 1.56rem;
  height: 1.22rem;
  margin: 0 auto;
}
.purchase .emptyProduct p {
  font-size: 0.26rem;
  color: #999;
  text-align: center;
}

/* 活动 */
.circle_actives_item_list li {
    overflow: hidden;
    display: block;
    padding: 0 .2rem;
    padding-top: 0.24rem;
    padding-bottom: 0.24rem;
    border-bottom: 1px solid #d8d8d8;
}
.circle_actives_item_list small {
    width: 2.28rem;
    height: 1.8rem;
    float: left;
    margin-right: 0.2rem;
}
.circle_actives_item_list small img {
    width: 2.28rem !important;
    height: 1.8rem;
}
.circle_actives_item_list .active_text {
    font-size: 0.28rem;
    color: #222;
    line-height: 0.36rem;
    text-align: left;
    padding-bottom: 0;
    background-color: transparent;
    position: relative;
}
.circle_actives_item_list .active_text em {
    font-style: normal;
    color: #e50838;
    display: inline-block;
    border: 1px solid #e50838;
    border-radius: 2px;
    font-size: 0.18rem;
    margin-right: .2rem;
    width: 0.64rem;
    text-align: center;
}
.circle_actives_item_list .active_text:nth-of-type(2) {
    font-size: 0.22rem;
    color: #999;
    margin-top: 0.2rem;
}
.circle_actives_item_list .active_text:nth-of-type(3) {
    margin-top: 0.4rem;
}
.circle_actives_item_list .active_text:last-child span strong {
    font-size: .36rem;
    color: #e50838;
    font-weight: 700;
}
/* .circle_actives_item_list .active_text:last-child span:last-child {
    font-size: 0.22rem;
    background-color: #e50838;
    color: #fff;
    line-height: .4rem;
    width: 1.58rem;
    height: 0.4rem;
    text-align: center;
    border-radius: 2px;
    display: inline-block;
    position: absolute;
    right: 0;
} */

.circle_actives_item_list .active_text:last-child span {
    font-size: 0.2rem;
    color: #e50838;
}

/* 活动为空 */
.active_list .emptyProduct {
  padding: 0 0 0.2rem;
  box-sizing: border-box;
}
.active_list .emptyProduct img {
  width: 1.56rem;
  height: 1.22rem;
  margin: 0 auto;
}
.active_list .emptyProduct p {
  font-size: 0.26rem;
  color: #999;
  text-align: center;
}

/* 新闻为空 */
.info_list_circle .emptyProduct {
  padding: 0 0 0.2rem;
  box-sizing: border-box;
  background-color: #fff;
}
.info_list_circle .emptyProduct img {
  width: 1.56rem;
  height: 1.22rem;
  margin: 0 auto;
}
.info_list_circle .emptyProduct p {
  font-size: 0.26rem;
  color: #999;
  text-align: center;
}

/* 浮层文字框 */
.circle_data_img .img_user_one {
    width: 1.1rem;
    height: 1.1rem;
    font-size: 0.3rem;
    line-height: 1.1rem;
    text-align: center;
    display: inline-block;
    background: url('../common/images/UI-04.png') no-repeat center;
    background-size: cover;
}



</style>
